import VueRouter from 'vue-router'

import home from './components/tabbar/Home.vue'
import member from './components/tabbar/Member.vue'
import shopper from './components/tabbar/Shopper.vue'
import search from './components/tabbar/Search.vue'
import newslist from './components/news/NewsList.vue'
import newsinfo from './components/news/Newsinfo.vue'
import photolist from './components/photos/PhotoList.vue'
import photoinfo from './components/photos/PhotoInfo.vue'
import goodslist from './components/goods/GoodsList.vue'
import goodsinfo from './components/goods/GoodsInfo.vue'
import goodsDesc from './components/goods/GoodsDesc.vue'
import goodsComment from './components/goods/GoodsComment.vue'

var router = new VueRouter({
    routes: [
        { path: '/', redirect: '/home'},
        { path: '/home', component: home },
        { path: '/member', component: member },
        { path: '/shopper', component: shopper },
        { path: '/search', component: search },
        { path: '/home/newslist', component: newslist},
        { path: '/home/newsinfo/:id', component: newsinfo},
        { path: '/home/photolist', component: photolist},
        { path: '/home/photoinfo/:id', component: photoinfo},
        { path: '/home/goodslist', component: goodslist},
        { path: '/home/goodsinfo/:id', component: goodsinfo},
        { path: '/home/goodsDesc/:id', component: goodsDesc, name: 'goodsDesc'},
        { path: '/home/goodsComment/:id', component: goodsComment, name:'goodsComment'}
    ],
    linkActiveClass: 'mui-active'
})

export default router